package com.xing.oauth.server.config;


import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "aligenie")
public class AligenieProperties {

    //天猫精灵AT失效时间
    private int aligenieAtExpiresIn;

    //天猫RT失效时间
    private int rtExpiresIn;

    //code有效时间
    private int codeExpiresIn;

    //天猫精灵客户端名称
    private String clientName;

    //天猫精灵返回路径
    private String redirectUrl;

    //请求下发时的天猫回调地址，用作授权码下发成功回调地址
    private String callbackUrl;

    public int getAligenieAtExpiresIn() {
        return aligenieAtExpiresIn;
    }

    public void setAligenieAtExpiresIn(int aligenieAtExpiresIn) {
        this.aligenieAtExpiresIn = aligenieAtExpiresIn;
    }

    public int getRtExpiresIn() {
        return rtExpiresIn;
    }

    public void setRtExpiresIn(int rtExpiresIn) {
        this.rtExpiresIn = rtExpiresIn;
    }

    public int getCodeExpiresIn() {
        return codeExpiresIn;
    }

    public void setCodeExpiresIn(int codeExpiresIn) {
        this.codeExpiresIn = codeExpiresIn;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getRedirectUrl() {
        return redirectUrl;
    }

    public void setRedirectUrl(String redirectUrl) {
        this.redirectUrl = redirectUrl;
    }

    public String getCallbackUrl() {
        return callbackUrl;
    }

    public void setCallbackUrl(String callbackUrl) {
        this.callbackUrl = callbackUrl;
    }

    @Override
    public String toString() {
        return "AligenieProperties{" +
                "aligenieAtExpiresIn=" + aligenieAtExpiresIn +
                ", rtExpiresIn=" + rtExpiresIn +
                ", codeExpiresIn=" + codeExpiresIn +
                ", clientName='" + clientName + '\'' +
                ", redirectUrl='" + redirectUrl + '\'' +
                ", callbackUrl='" + callbackUrl + '\'' +
                '}';
    }
}
